import 'package:flutter/material.dart';

class Test_listview_builder extends StatelessWidget {
  const Test_listview_builder({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: const Text('Test_listview_builder')),
        body: ListView.builder(
            // cacheExtent: 0, //默认约等于25
            physics: const NeverScrollableScrollPhysics(),
            shrinkWrap: true,
            itemCount: 100,
            itemExtent: 50.0, //强制高度为50.0
            itemBuilder: (BuildContext context, int index) {
              print('JtTag:构建:${index}');
              return ListTile(title: Text("$index"));
            }
        ));
  }
}
